<!DOCTYPE html>
<html>
<head>
     <script src="/static/js/vue-2.5.16.js"></script>
    <script type="text/javascript" src="/static/js/axios-0.18.0.min.js"></script>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>爱家-我的房源</title>
    <link href="/static/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/static/css/reset.css" rel="stylesheet">
    <link href="/static/plugins/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet">
    <link href="/static/css/ihome/main.css" rel="stylesheet">
    <link href="/static/css/ihome/myhouse.css" rel="stylesheet">


</head>
<body>
<div class="container">
    <div class="top-bar">
        <div class="nav-bar">
            <h3 class="page-title">我的房源</h3>
            <a class="nav-btn fl" href="/my.html"><span><i class="fa fa-angle-left fa-2x"></i></span></a>
        </div>
    </div>
    <div class="houses-con">
        <ul class="houses-list auth-warn">
            <li>
                <div class="house-title">
                    <h3>尚未进行实名认证，无法发布房屋信息！</h3>
                </div>
                <div class="house-content">
                    <a href="/auth.html" class="btn btn-success">去实名认证</a>
                </div>
            </li>
        </ul>
        <ul id="houses-list" class="houses-list">
        </ul>
        <script id="houses-list-tmpl" type="text/html">
            <li>
                <div class="new-house">
                    <a href="/newhouse.html">发布新房源</a>
                </div>
            </li>
            {{each houses as house}}
            <li>

                <div class="house-title">
                    <h3>房屋ID:{{house.house_id}} —— {{house.title}}</h3>
                </div>
                <div class="house-content">
                    <a href="/detail.html?id={{house.house_id}}">
                        <img src="{{house.img_url}}">

                    </a>

                    <div class="house-text">

                        <ul>
                            <li>位于：{{house.area_name}}</li>
                            <li>价格：￥{{(house.price).toFixed(0)}}/晚</li>
                            <li>发布时间：{{house.ctime}}</li>
                            <li house-id={{house.house_id}}>


<!--                                <p class="delete"><button onclick="delete()">删除房源</button></p>-->
            <button type="button" onclick="delete_house()" class="delmyhouse" >删除房源</button>


                            </li>
                        </ul>
                    </div>
                </div>
                </a>
            </li>
            {{/each}}
        </script>
    </div>
    <div class="footer">
        <p><span><i class="fa fa-copyright"></i></span>爱家租房&nbsp;&nbsp;享受家的温馨</p>
    </div>
</div>





<script type="text/javascript" src="/static/js/axios-0.18.0.min.js"></script>
<script src="/static/js/vue-2.5.16.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/plugins/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/plugins/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
<script src="/static/plugins/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="/static/js/ihome/host.js"></script>
<script src="/static/js/template.js"></script>
<script src="/static/js/ihome/myhouse.js"></script>
</body>



<!--<script>-->
<!--    window.onload = function () {-->
<!--        var vm = new Vue({-->
<!--        el: '.house-text',-->
<!--        data: {-->
<!--            host: 'http://www.meiduo.site:8000',-->
<!--            error_username: false,-->
<!--            error_pwd: false,-->
<!--            error_pwd_message: '请填写密码',-->
<!--            username: '',-->
<!--            password: '',-->
<!--            remember: false-->
<!--        },-->
<!--        methods: {-->
<!--            delete_house: function () {-->
<!--                alert('ok')-->


<!--            }-->


<!--        }-->


<!--    })-->

<!--    }-->



</script>

</html>